<template>


<table>
        <tr>
            <th>等级名称</th>
            <th><input type="text" v-model="a.dname"></th>
        </tr>

        
        <tr>

<th></th>
    <th>
        <button @click="AddDengji" value="添加">添加</button>
    </th>

    </tr>


</table>



</template>


<script setup lang="ts">


import axios from 'axios';
import {ref} from 'vue';

const a = ref({

    dname:"",

})

const AddDengji=()=>{


        axios.post('https://localhost:7188/api/Dengji/AddDengji',a.value).then(res=>{


            if(res.data>0)
        {
            alert('添加成功')
        }
        else
        {
            alert('添加失败')
        }
        })

}




</script>